import request from '@/utils/request'

export function listCategory(query) {
  return request({
    url: '/product-type/getShopProductTypeList',
    method: 'get',
    params: query
  })
}


export function createCategory(data) {
  return request({
    url: '/product-type/saveProductType',
    method: 'post',
    data
  })
}

export function readCategory(query) {
  return request({
    url: '/product-type/getProductTypeById',
    method: 'get',
    params: query
  })
}

export function updateCategory(data) {
  return request({
    url: '/product-type/saveProductType',
    method: 'post',
    data
  })
}

export function deleteCategory(query) {
  return request({
    url: '/product-type/delProductType',
    method: 'get',
    params: query
  })
}
